﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web.master" AutoEventWireup="true"
    CodeFile="DictionaryManager.aspx.cs" Inherits="Systems_DictionaryManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../Scripts/jquery132min.js" type="text/javascript"></script>
    <script src="../Scripts/GiveTip.js" type="text/javascript"></script>
    <script src="../Scripts/validform.js" type="text/javascript"></script>
    <script src="../Scripts/YJPopup.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $.checkForm();
        })
        var MyPopup;
        $(document).ready(function () {
            MyPopup = new YJPopup({
                contentDivID: "YJContentDiv",
                dragBarDivID: "YJDragBar",
                dragable: true,
                autoCreate: true
            })
        });
        function ShowPopup(ID) {
            MyPopup.Show("600px", "115px", "修改", "DictionaryModify.aspx?ID=" + ID + "&_" + Math.random());
        }
        function ClosePopup() {
            MyPopup.Hide();
        } 
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="filter-from">
        <table cellpadding="2" cellspacing="4">
            <tr>
                <td>
                    字典类型：
                </td>
                <td>
                    <NC:FTextBox ID="txtDicType" Width="100px" runat="server" CheckGroup="Add"></NC:FTextBox>
                </td>
                <td>
                    字典名称：
                </td>
                <td>
                    <NC:FTextBox ID="txtDicName" Width="200px" runat="server" CheckGroup="Add"></NC:FTextBox>
                </td>
                <td>
                    字典值：
                </td>
                <td>
                    <NC:FTextBox ID="txtDicValue" Width="200px" runat="server" CheckGroup="Add"></NC:FTextBox>
                </td>
                <td>
                    排序：
                </td>
                <td>
                    <NC:FTextBox ID="txtPaiXu" runat="server" Width="50px" CheckType="Int" CheckGroup="Add">0</NC:FTextBox>
                </td>
                <td>
                    <asp:Button ID="btnAdd" runat="server" class="btn btn3" Text="添加" OnClick="btnAdd_Click" />
                    <asp:Button ID="btnBindData" runat="server" Text="更新" uncheck="true" CssClass="hidden"
                        OnClick="btnBindData_Click" />
                </td>
            </tr>
        </table>
    </div>
    <NC:FGridView ID="FGridView1" runat="server" AutoCreateNumber="true" DataKeyNames="ID"
        PageSize="10" ShowFooter="true">
        <Columns>
            <asp:BoundField DataField="DicType" HeaderText="字典类型" ItemStyle-Width="100px" />
            <asp:BoundField DataField="DicName" HeaderText="字典名称" ItemStyle-Width="120px" />
            <asp:BoundField DataField="DicValue" HeaderText="字典值" />
            <asp:BoundField DataField="PaiXu" HeaderText="排序" ItemStyle-Width="60px" />
            <asp:TemplateField HeaderText="操作" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <input type="button" class="Gridbtn" value="修改" id="UpdateButton" onclick="ShowPopup('<%# Eval("ID") %>')">
                    <asp:Button runat="server" class="Gridbtn" Text="删除" ID="DelButton" uncheck="true"
                        OnClick="DelButton_Click" OnClientClick="GiveTip(event,'您确定删除吗？');" CommandArgument='<%# Eval("ID") %>' />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </NC:FGridView>
</asp:Content>
